package net.ant.watercalc.web.utils;

import java.math.BigDecimal;

public class KspUtil {

    private static final String[] KSP_CASO4 = new String[]{
            "0.012=1.00",
            "0.013=1.02",
            "0.014=1.05",
            "0.015=1.08",
            "0.016=1.11",
            "0.017=1.13",
            "0.018=1.16",
            "0.019=1.19",
            "0.020=1.22",
            "0.021=1.24",
            "0.022=1.26",
            "0.023=1.29",
            "0.024=1.32",
            "0.025=1.34",
            "0.026=1.36",
            "0.027=1.38",
            "0.028=1.40",
            "0.029=1.43",
            "0.030=1.46",
            "0.031=1.48",
            "0.032=1.50",
            "0.033=1.52",
            "0.034=1.55",
            "0.035=1.57",
            "0.036=1.59",
            "0.037=1.60",
            "0.038=1.62",
            "0.039=1.64",
            "0.040=1.69",
            "0.041=1.61",
            "0.042=1.73",
            "0.043=1.75",
            "0.044=1.77",
            "0.045=1.79",
            "0.046=1.82",
            "0.047=1.84",
            "0.048=1.85",
            "0.049=1.88",
            "0.050=1.91",
            "0.051=1.93",
            "0.052=1.95",
            "0.053=1.97",
            "0.054=1.99",
            "0.055=2.02",
            "0.056=2.05",
            "0.057=2.07",
            "0.058=2.09",
            "0.059=2.11",
            "0.060=2.13",
            "0.061=2.15",
            "0.062=2.17",
            "0.063=2.19",
            "0.064=2.21",
            "0.065=2.23",
            "0.066=2.25",
            "0.067=2.27",
            "0.068=2.29",
            "0.069=2.31",
            "0.070=2.33",
            "0.071=2.35",
            "0.072=2.37",
            "0.073=2.39",
            "0.074=2.41",
            "0.075=2.43",
            "0.076=2.45",
            "0.077=2.47",
            "0.078=2.50",
            "0.079=2.53",
            "0.080=2.55",
            "0.081=2.57",
            "0.082=2.59",
            "0.083=2.61",
            "0.084=2.64",
            "0.085=2.66",
            "0.086=2.69",
            "0.087=2.71",
            "0.088=2.73",
            "0.089=2.76",
            "0.090=2.79",
            "0.091=2.81",
            "0.092=2.83",
            "0.093=2.85",
            "0.094=2.87",
            "0.095=2.89",
            "0.096=2.90",
            "0.097=2.92",
            "0.098=2.94",
            "0.099=2.96",
            "0.10=2.98",
            "0.11=3.18",
            "0.12=3.38",
            "0.13=3.58",
            "0.14=3.78",
            "0.15=3.98",
            "0.16=4.15",
            "0.17=4.35",
            "0.18=4.55",
            "0.19=4.75",
            "0.20=4.95",
            "0.21=5.13",
            "0.22=5.31",
            "0.23=5.49",
            "0.24=5.67",
            "0.25=5.85",
            "0.26=6.03",
            "0.27=6.21",
            "0.28=6.39",
            "0.29=6.57",
            "0.30=6.79",
            "0.31=6.97",
            "0.32=7.15",
            "0.33=7.33",
            "0.34=7.51",
            "0.35=7.69",
            "0.36=7.87",
            "0.37=8.05",
            "0.38=8.23",
            "0.39=8.41",
            "0.40=8.58",
            "0.41=8.72",
            "0.42=8.86",
            "0.43=9.00",
            "0.44=9.14",
            "0.45=9.28",
            "0.46=9.42",
            "0.47=9.56",
            "0.48=9.71",
            "0.49=9.86",
            "0.50=10.3",
            "0.51=10.5",
            "0.52=10.7",
            "0.53=10.9",
            "0.54=11.1",
            "0.55=11.2",
            "0.56=11.3",
            "0.57=11.4",
            "0.58=11.5",
            "0.59=11.6",
            "0.60=11.7",
            "0.61=11.9",
            "0.62=12.0",
            "0.63=12.2",
            "0.64=12.4",
            "0.65=12.6",
            "0.66=12.8",
            "0.67=12.9",
            "0.68=13.0",
            "0.69=13.2",
            "0.70=13.3",
            "0.71=13.5",
            "0.72=13.6",
            "0.73=13.7",
            "0.74=13.8",
            "0.75=13.9",
            "0.76=14.0",
            "0.77=14.2",
            "0.78=14.4",
            "0.79=14.6",
            "0.80=14.8",
            "0.81=14.9",
            "0.82=15.0",
            "0.83=15.1",
            "0.84=15.2",
            "0.85=15.3",
            "0.86=15.5",
            "0.87=15.6",
            "0.88=15.8",
            "0.89=15.9",
            "0.90=16.1",
            "0.91=16.2",
            "0.92=16.4",
            "0.93=16.5",
            "0.94=16.7",
            "0.95=16.8",
            "0.96=17.0",
            "0.97=17.1",
            "0.98=17.2",
            "0.99=17.4",
            "1.00=17.6",
            "1.01=17.6",
            "1.02=17.6",
            "1.03=17.6",
            "1.04=17.6",
            "1.05=18.1",
            "1.06=18.1",
            "1.07=18.6",
            "1.08=18.6",
            "1.09=18.6",
            "1.10=18.6",
            "1.11=18.6",
            "1.12=18.6",
            "1.13=18.6",
            "1.14=18.6",
            "1.15=19.1",
            "1.16=19.1",
            "1.17=19.6",
            "1.18=19.6",
            "1.19=19.6",
            "1.20=19.6",
            "1.21=19.6",
            "1.22=19.6",
            "1.23=19.6",
            "1.24=19.6",
            "1.25=20.1",
            "1.26=20.1",
            "1.27=20.5",
            "1.28=20.5",
            "1.29=20.5",
            "1.30=20.5",
            "1.31=20.5",
            "1.32=20.5",
            "1.33=20.5",
            "1.34=20.5",
            "1.35=21.0",
            "1.36=21.0",
            "1.37=21.5",
            "1.38=21.5",
            "1.39=21.5",
            "1.40=21.5",
            "1.41=21.5",
            "1.42=21.5",
            "1.43=21.5",
            "1.44=21.5",
            "1.45=22.1",
            "1.46=22.1",
            "1.47=22.6",
            "1.48=22.6",
            "1.49=22.6",
            "1.50=22.6",
            "1.51=22.6",
            "1.52=22.6",
            "1.53=22.6",
            "1.54=22.6",
            "1.55=23.1",
            "1.56=23.1",
            "1.57=23.6",
            "1.58=23.6",
            "1.59=23.6",
            "1.60=23.6",
            "1.61=23.6",
            "1.62=23.6",
            "1.63=23.6",
            "1.64=23.6",
            "1.65=24.2",
            "1.66=24.2",
            "1.67=24.7",
            "1.68=24.7",
            "1.69=24.7",
            "1.70=24.7",
            "1.71=24.7",
            "1.72=24.7",
            "1.73=24.7",
            "1.74=24.7",
            "1.75=25.2",
            "1.76=25.2",
            "1.77=25.7",
            "1.78=25.7",
            "1.79=25.7",
            "1.80=25.7",
            "1.81=25.7",
            "1.82=25.7",
            "1.83=25.7",
            "1.84=25.7",
            "1.85=26.2",
            "1.86=26.2",
            "1.87=26.7",
            "1.88=26.7",
            "1.89=26.7",
            "1.90=26.7",
            "1.91=26.7",
            "1.92=26.7",
            "1.93=26.7",
            "1.94=26.7",
            "1.95=27.3",
            "1.96=27.3",
            "1.97=27.8",
            "1.98=27.8",
            "1.99=27.8",
            "2.00=27.8"
    };

    private static final String[] KSP_BASO4 = new String[]{
            "0.010=0.230",
            "0.011=0.233",
            "0.012=0.235",
            "0.013=0.242",
            "0.014=0.254",
            "0.015=0.260",
            "0.016=0.270",
            "0.017=0.278",
            "0.018=0.287",
            "0.019=0.296",
            "0.020=0.303",
            "0.021=0.316",
            "0.022=0.319",
            "0.023=0.329",
            "0.024=0.338",
            "0.025=0.346",
            "0.026=0.357",
            "0.027=0.362",
            "0.028=0.371",
            "0.029=0.378",
            "0.030=0.388",
            "0.031=0.396",
            "0.032=0.404",
            "0.033=0.412",
            "0.034=0.421",
            "0.035=0.429",
            "0.036=0.435",
            "0.037=0.442",
            "0.038=0.453",
            "0.039=0.459",
            "0.040=0.470",
            "0.041=0.477",
            "0.042=0.484",
            "0.043=0.496",
            "0.044=0.508",
            "0.045=0.516",
            "0.046=0.523",
            "0.047=0.532",
            "0.048=0.540",
            "0.049=0.549",
            "0.050=0.558",
            "0.051=0.567",
            "0.052=0.575",
            "0.053=0.583",
            "0.054=0.590",
            "0.055=0.600",
            "0.056=0.610",
            "0.057=0.618",
            "0.058=0.625",
            "0.059=0.633",
            "0.060=0.641",
            "0.061=0.650",
            "0.062=0.658",
            "0.063=0.667",
            "0.064=0.676",
            "0.065=0.686",
            "0.066=0.695",
            "0.067=0.703",
            "0.068=0.710",
            "0.069=0.719",
            "0.070=0.727",
            "0.071=0.736",
            "0.072=0.744",
            "0.073=0.753",
            "0.074=0.761",
            "0.075=0.770",
            "0.076=0.778",
            "0.077=0.787",
            "0.078=0.795",
            "0.079=0.804",
            "0.080=0.812",
            "0.081=0.821",
            "0.082=0.829",
            "0.083=0.838",
            "0.084=0.846",
            "0.085=0.853",
            "0.086=0.860",
            "0.087=0.870",
            "0.088=0.880",
            "0.089=0.889",
            "0.090=0.897",
            "0.091=0.906",
            "0.092=0.914",
            "0.093=0.923",
            "0.094=0.931",
            "0.095=0.940",
            "0.096=0.948",
            "0.097=0.957",
            "0.098=0.965",
            "0.099=0.974",
            "0.100=0.982",
            "0.101=0.982",
            "0.102=0.982",
            "0.103=0.982",
            "0.104=0.982",
            "0.105=1.019",
            "0.106=1.019",
            "0.107=1.055",
            "0.108=1.055",
            "0.109=1.055",
            "0.11=1.055",
            "0.12=1.145",
            "0.13=1.245",
            "0.14=1.355",
            "0.15=1.415",
            "0.16=1.485",
            "0.17=1.565",
            "0.18=1.625",
            "0.19=1.685",
            "0.20=1.795",
            "0.21=1.865",
            "0.22=1.945",
            "0.23=2.045",
            "0.24=2.165",
            "0.25=2.185",
            "0.26=2.275",
            "0.27=2.345",
            "0.28=2.415",
            "0.29=2.485",
            "0.30=2.575",
            "0.31=2.685",
            "0.32=2.725",
            "0.33=2.795",
            "0.34=2.895",
            "0.35=2.985",
            "0.36=3.045",
            "0.37=3.125",
            "0.38=3.185",
            "0.39=3.265",
            "0.40=3.375",
            "0.41=3.445",
            "0.42=3.515",
            "0.43=3.585",
            "0.44=3.685",
            "0.45=3.735",
            "0.46=3.795",
            "0.47=3.855",
            "0.48=3.945",
            "0.49=4.035",
            "0.50=4.115",
            "0.51=4.185",
            "0.52=4.255",
            "0.53=4.325",
            "0.54=4.395",
            "0.55=4.465",
            "0.56=4.515",
            "0.57=4.585",
            "0.58=4.645",
            "0.59=4.725",
            "0.60=4.805",
            "0.61=4.875",
            "0.62=4.945",
            "0.63=5.015",
            "0.64=5.085",
            "0.65=5.155",
            "0.66=5.225",
            "0.67=5.295",
            "0.68=5.365",
            "0.69=5.440",
            "0.70=5.515",
            "0.71=5.585",
            "0.72=5.655",
            "0.73=5.725",
            "0.74=5.795",
            "0.75=5.865",
            "0.76=5.935",
            "0.77=6.005",
            "0.78=6.075",
            "0.79=6.145",
            "0.80=6.225",
            "0.81=6.295",
            "0.82=6.365",
            "0.83=6.435",
            "0.84=6.505",
            "0.85=6.575",
            "0.86=6.645",
            "0.87=6.715",
            "0.88=6.785",
            "0.89=6.855",
            "0.90=6.915",
            "0.91=6.975",
            "0.92=7.035",
            "0.93=7.095",
            "0.94=7.155",
            "0.95=7.215",
            "0.96=7.275",
            "0.97=7.335",
            "0.98=7.395",
            "0.99=7.455",
            "1.00=7.505",
            "1.01=7.505",
            "1.02=7.505",
            "1.03=7.505",
            "1.04=7.505",
            "1.05=7.825",
            "1.06=7.825",
            "1.07=8.165",
            "1.08=8.165",
            "1.09=8.165",
            "1.10=8.165",
            "1.11=8.165",
            "1.12=8.165",
            "1.13=8.165",
            "1.14=8.165",
            "1.15=8.805",
            "1.16=8.805",
            "1.17=8.855",
            "1.18=8.855",
            "1.19=8.855",
            "1.20=8.855",
            "1.21=8.855",
            "1.22=8.855",
            "1.23=8.855",
            "1.24=8.855",
            "1.25=9.085",
            "1.26=9.085",
            "1.27=9.305",
            "1.28=9.305",
            "1.29=9.305",
            "1.30=9.305",
            "1.31=9.305",
            "1.32=9.305",
            "1.33=9.305",
            "1.34=9.305",
            "1.35=9.655",
            "1.36=9.655",
            "1.37=10.015",
            "1.38=10.015",
            "1.39=10.015",
            "1.40=10.015"
    };

    private static final String[] KSP_SRSO4 = new String[]{
            "0.010=0.468",
            "0.011=0.483",
            "0.012=0.510",
            "0.013=0.531",
            "0.014=0.552",
            "0.015=0.573",
            "0.016=0.594",
            "0.017=0.615",
            "0.018=0.636",
            "0.019=0.657",
            "0.020=0.679",
            "0.021=0.698",
            "0.022=0.717",
            "0.023=0.736",
            "0.024=0.755",
            "0.025=0.775",
            "0.026=0.795",
            "0.027=0.815",
            "0.028=0.835",
            "0.029=0.855",
            "0.030=0.875",
            "0.031=0.896",
            "0.032=0.917",
            "0.033=0.938",
            "0.034=0.958",
            "0.035=0.980",
            "0.036=1.002",
            "0.037=1.024",
            "0.038=1.046",
            "0.039=1.068",
            "0.040=1.090",
            "0.041=1.110",
            "0.042=1.130",
            "0.043=1.150",
            "0.044=1.170",
            "0.045=1.190",
            "0.046=1.210",
            "0.047=1.230",
            "0.048=1.250",
            "0.049=1.270",
            "0.050=1.290",
            "0.051=1.312",
            "0.052=1.334",
            "0.053=1.356",
            "0.054=1.378",
            "0.055=1.400",
            "0.056=1.422",
            "0.057=1.444",
            "0.058=1.466",
            "0.059=1.488",
            "0.060=1.510",
            "0.061=1.533",
            "0.062=1.556",
            "0.063=1.579",
            "0.064=1.602",
            "0.065=1.625",
            "0.066=1.648",
            "0.067=1.671",
            "0.068=1.694",
            "0.069=1.717",
            "0.070=1.740",
            "0.071=1.763",
            "0.072=1.786",
            "0.073=1.809",
            "0.074=1.832",
            "0.075=1.855",
            "0.076=1.878",
            "0.077=1.901",
            "0.078=1.924",
            "0.079=1.947",
            "0.080=1.970",
            "0.081=1.995",
            "0.082=2.020",
            "0.083=2.045",
            "0.084=2.070",
            "0.085=2.095",
            "0.086=2.120",
            "0.087=2.145",
            "0.088=2.170",
            "0.089=2.195",
            "0.090=2.220",
            "0.091=2.244",
            "0.092=2.268",
            "0.093=2.292",
            "0.094=2.316",
            "0.095=2.340",
            "0.096=2.364",
            "0.097=2.388",
            "0.098=2.412",
            "0.099=2.436",
            "0.100=2.460",
            "0.101=2.460",
            "0.102=2.460",
            "0.103=2.460",
            "0.104=2.564",
            "0.105=2.564",
            "0.106=2.564",
            "0.107=2.668",
            "0.108=2.668",
            "0.109=2.668",
            "0.110=2.668",
            "0.111=2.668",
            "0.112=2.772",
            "0.113=2.772",
            "0.114=2.772",
            "0.115=2.876",
            "0.116=2.876",
            "0.117=2.876",
            "0.118=2.876",
            "0.119=2.980",
            "0.120=2.980",
            "0.121=2.980",
            "0.122=2.980",
            "0.123=3.094",
            "0.124=3.094",
            "0.125=3.094",
            "0.126=3.094",
            "0.127=3.208",
            "0.128=3.208",
            "0.129=3.208",
            "0.130=3.208",
            "0.131=3.322",
            "0.132=3.322",
            "0.133=3.322",
            "0.134=3.322",
            "0.135=3.322",
            "0.136=3.436",
            "0.137=3.436",
            "0.138=3.436",
            "0.139=3.436",
            "0.140=3.550",
            "0.141=3.550",
            "0.142=3.550",
            "0.143=3.550",
            "0.144=3.656",
            "0.145=3.656",
            "0.146=3.656",
            "0.147=3.656",
            "0.148=3.762",
            "0.149=3.762",
            "0.150=3.762",
            "0.151=3.762",
            "0.152=3.868",
            "0.153=3.868",
            "0.154=3.868",
            "0.155=3.868",
            "0.156=3.974",
            "0.157=3.974",
            "0.158=3.974",
            "0.159=3.974",
            "0.160=4.080",
            "0.161=4.080",
            "0.162=4.080",
            "0.163=4.080",
            "0.164=4.196",
            "0.165=4.196",
            "0.166=4.196",
            "0.167=4.196",
            "0.168=4.312",
            "0.169=4.312",
            "0.170=4.312",
            "0.171=4.312",
            "0.172=4.428",
            "0.173=4.428",
            "0.174=4.428",
            "0.175=4.428",
            "0.176=4.544",
            "0.177=4.544",
            "0.178=4.544",
            "0.179=4.544",
            "0.180=4.660",
            "0.181=4.660",
            "0.182=4.660",
            "0.183=4.660",
            "0.184=4.768",
            "0.185=4.768",
            "0.186=4.768",
            "0.187=4.768",
            "0.188=4.876",
            "0.189=4.876",
            "0.190=4.876",
            "0.191=4.876",
            "0.192=4.984",
            "0.193=4.984",
            "0.194=4.984",
            "0.195=4.984",
            "0.196=5.092",
            "0.197=5.092",
            "0.198=5.092",
            "0.199=5.092",
            "0.20=5.200",
            "0.21=5.499",
            "0.22=5.798",
            "0.23=6.097",
            "0.24=6.396",
            "0.25=6.695",
            "0.26=6.994",
            "0.27=7.293",
            "0.28=7.592",
            "0.29=7.891",
            "0.30=8.190",
            "0.31=8.491",
            "0.32=8.792",
            "0.33=9.093",
            "0.34=9.394",
            "0.35=9.695",
            "0.36=9.996",
            "0.37=10.29",
            "0.38=10.60",
            "0.39=10.90",
            "0.40=11.20",
            "0.41=11.45",
            "0.42=11.70",
            "0.43=11.95",
            "0.44=12.20",
            "0.45=12.45",
            "0.46=12.70",
            "0.47=12.95",
            "0.48=13.20",
            "0.49=13.45",
            "0.50=13.70",
            "0.51=13.92",
            "0.52=14.14",
            "0.53=14.36",
            "0.54=14.58",
            "0.55=14.80",
            "0.56=15.02",
            "0.57=15.24",
            "0.58=15.46",
            "0.59=15.68",
            "0.60=15.90",
            "0.61=16.11",
            "0.62=16.32",
            "0.63=16.53",
            "0.64=16.74",
            "0.65=16.95",
            "0.66=17.15",
            "0.67=17.36",
            "0.68=17.57",
            "0.69=17.78",
            "0.70=17.95",
            "0.71=18.12",
            "0.72=18.29",
            "0.73=18.46",
            "0.74=18.63",
            "0.75=18.80",
            "0.76=18.96",
            "0.77=19.12",
            "0.78=19.28",
            "0.79=19.44",
            "0.80=19.60",
            "0.81=19.73",
            "0.82=19.86",
            "0.83=19.99",
            "0.84=20.12",
            "0.85=20.25",
            "0.86=20.38",
            "0.87=20.51",
            "0.88=20.64",
            "0.89=20.77",
            "0.90=20.90",
            "0.91=20.99",
            "0.92=21.08",
            "0.93=21.17",
            "0.94=21.26",
            "0.95=21.35",
            "0.96=21.44",
            "0.97=21.53",
            "0.98=21.62",
            "0.99=21.71",
            "1.00=21.80",
            "1.01=21.80",
            "1.02=22.14",
            "1.03=22.14",
            "1.04=22.14",
            "1.05=22.14",
            "1.06=22.48",
            "1.07=22.48",
            "1.08=22.48",
            "1.09=22.48",
            "1.10=22.82",
            "1.11=22.82",
            "1.12=22.82",
            "1.13=22.82",
            "1.14=23.16",
            "1.15=23.16",
            "1.16=23.16",
            "1.17=23.16",
            "1.18=23.50",
            "1.19=23.50",
            "1.20=23.50",
            "1.21=23.50",
            "1.22=23.72",
            "1.23=23.72",
            "1.24=23.72",
            "1.25=23.72",
            "1.26=23.94",
            "1.27=23.94",
            "1.28=23.94",
            "1.29=23.94",
            "1.30=24.16",
            "1.31=24.16",
            "1.32=24.16",
            "1.33=24.16",
            "1.34=24.38",
            "1.35=24.38",
            "1.36=24.38",
            "1.37=24.38",
            "1.38=24.38",
            "1.39=24.60",
            "1.40=24.60",
            "1.41=24.74",
            "1.42=24.74",
            "1.43=24.74",
            "1.44=24.74",
            "1.45=24.88",
            "1.46=24.88",
            "1.47=24.88",
            "1.48=24.88",
            "1.49=24.88",
            "1.50=25.02",
            "1.51=25.02",
            "1.52=25.02",
            "1.53=25.16",
            "1.54=25.16",
            "1.55=25.16",
            "1.56=25.16",
            "1.57=25.30",
            "1.58=25.30",
            "1.59=25.30",
            "1.60=25.30",
            "1.61=25.38",
            "1.62=25.38",
            "1.63=25.38",
            "1.64=25.38",
            "1.65=25.46",
            "1.66=25.46",
            "1.67=25.46",
            "1.68=25.46",
            "1.69=25.46",
            "1.70=25.54",
            "1.71=25.54",
            "1.72=25.54",
            "1.73=25.54",
            "1.74=25.54",
            "1.75=25.54",
            "1.76=25.62",
            "1.77=25.62",
            "1.78=25.62",
            "1.79=25.62",
            "1.80=25.70",
            "1.81=25.76",
            "1.82=25.76",
            "1.83=25.76",
            "1.84=25.76",
            "1.85=25.76",
            "1.86=25.82",
            "1.87=25.82",
            "1.88=25.82",
            "1.89=25.82",
            "1.90=25.88",
            "1.91=25.88",
            "1.92=25.88",
            "1.93=25.88",
            "1.94=25.88",
            "1.95=25.94",
            "1.96=25.94",
            "1.97=26.00",
            "1.98=26.00",
            "1.99=26.00",
            "2.00=26.00"
    };

    private static final String[] KSP_SIO2_PH = new String[]{
            "4=1.355",
            "4.02=1.3525",
            "4.04=1.35",
            "4.06=1.3475",
            "4.08=1.345",
            "4.1=1.342",
            "4.12=1.339",
            "4.14=1.337",
            "4.16=1.335",
            "4.18=1.3325",
            "4.2=1.33",
            "4.22=1.3275",
            "4.24=1.325",
            "4.26=1.3225",
            "4.28=1.32",
            "4.3=1.318",
            "4.32=1.316",
            "4.34=1.314",
            "4.36=1.312",
            "4.38=1.31",
            "4.4=1.308",
            "4.42=1.305",
            "4.44=1.302",
            "4.46=1.299",
            "4.48=1.296",
            "4.5=1.294",
            "4.52=1.292",
            "4.54=1.29",
            "4.56=1.288",
            "4.58=1.285",
            "4.6=1.282",
            "4.62=1.28",
            "4.64=1.278",
            "4.66=1.275",
            "4.68=1.272",
            "4.7=1.27",
            "4.72=1.268",
            "4.74=1.265",
            "4.76=1.262",
            "4.78=1.26",
            "4.8=1.258",
            "4.82=1.255",
            "4.84=1.252",
            "4.86=1.25",
            "4.88=1.248",
            "4.9=1.2455",
            "4.92=1.243",
            "4.94=1.241",
            "4.96=1.239",
            "4.98=1.2375",
            "5=1.235",
            "5.02=1.2325",
            "5.04=1.23",
            "5.06=1.2275",
            "5.08=1.225",
            "5.1=1.2225",
            "5.12=1.22",
            "5.14=1.2175",
            "5.16=1.215",
            "5.18=1.2125",
            "5.2=1.21",
            "5.22=1.2025",
            "5.24=1.205",
            "5.26=1.203",
            "5.28=1.201",
            "5.3=1.1995",
            "5.32=1.198",
            "5.34=1.196",
            "5.36=1.194",
            "5.38=1.19",
            "5.4=1.188",
            "5.42=1.185",
            "5.44=1.182",
            "5.46=1.18",
            "5.48=1.178",
            "5.5=1.176",
            "5.52=1.174",
            "5.54=1.17",
            "5.56=1.168",
            "5.58=1.165",
            "5.6=1.162",
            "5.62=1.16",
            "5.64=1.158",
            "5.66=1.156",
            "5.68=1.154",
            "5.7=1.152",
            "5.72=1.15",
            "5.74=1.147",
            "5.76=1.144",
            "5.78=1.142",
            "5.8=1.14",
            "5.82=1.138",
            "5.84=1.136",
            "5.86=1.134",
            "5.88=1.13",
            "5.9=1.127",
            "5.92=1.124",
            "5.94=1.122",
            "9.96=1.12",
            "5.98=1.124",
            "6=1.126",
            "6.02=1.114",
            "6.04=1.112",
            "6.06=1.11",
            "6.08=1.108",
            "6.1=1.105",
            "6.12=1.102",
            "6.14=1.1",
            "6.16=1.098",
            "6.18=1.096",
            "6.2=1.094",
            "6.22=1.091",
            "6.24=1.088",
            "6.26=1.086",
            "6.28=1.084",
            "6.3=1.081",
            "6.32=1.078",
            "6.34=1.076",
            "6.36=1.074",
            "6.38=1.071",
            "6.4=1.068",
            "6.42=1.065",
            "6.44=1.062",
            "6.46=1.06",
            "6.48=1.058",
            "6.5=1.056",
            "6.52=1.054",
            "6.54=1.052",
            "6.56=1.05",
            "6.58=1.047",
            "6.6=1.044",
            "6.62=1.042",
            "6.64=1.04",
            "6.66=1.038",
            "6.68=1.036",
            "6.7=1.034",
            "6.72=1.032",
            "6.74=1.03",
            "6.76=1.028",
            "6.78=1.025",
            "6.8=1.022",
            "6.82=1.02",
            "6.84=1.018",
            "6.86=1.016",
            "6.88=1.014",
            "6.9=1.011",
            "6.92=1.008",
            "6.94=1.006",
            "6.96=1.004",
            "6.98=1.002",
            "7=1",
            "7.76=1",
            "7.78=1.009",
            "7.8=1.018",
            "7.82=1.028",
            "7.84=1.038",
            "7.86=1.048",
            "7.88=1.058",
            "7.9=1.068",
            "7.92=1.078",
            "7.94=1.094",
            "7.96=1.099",
            "7.98=1.11",
            "8=1.12",
            "8.02=1.132",
            "8.04=1.144",
            "8.06=1.154",
            "8.08=1.164",
            "8.1=1.178",
            "8.12=1.192",
            "8.14=1.204",
            "8.16=1.216",
            "8.18=1.228",
            "8.2=1.24",
            "8.22=1.253",
            "8.24=1.266",
            "8.26=1.281",
            "8.28=1.296",
            "8.3=1.31",
            "8.32=1.324",
            "8.34=1.341",
            "8.36=1.358",
            "8.38=1.374",
            "8.4=1.39",
            "8.42=1.405",
            "8.44=1.42",
            "8.46=1.438",
            "8.48=1.456",
            "8.5=1.468",
            "8.52=1.48",
            "8.54=1.503",
            "8.56=1.526",
            "8.58=1.544",
            "8.6=1.562",
            "8.62=1.581",
            "8.64=1.6",
            "8.66=1.62",
            "8.68=1.64",
            "8.7=1.661",
            "8.72=1.682",
            "8.74=1.704",
            "8.76=1.726",
            "8.78=1.747",
            "8.8=1.768",
            "8.82=1.791",
            "8.84=1.814",
            "8.86=1.838",
            "8.88=1.862",
            "8.9=1.886",
            "8.92=1.91",
            "8.94=1.937",
            "8.96=1.964",
            "8.98=1.99",
            "9=2.016",
            "9.02=2.028",
            "9.04=21.07",
            "9.06=2.096",
            "9.08=2.122",
            "9.1=2.151",
            "9.12=2.18",
            "9.14=2.21",
            "9.16=2.24",
            "9.18=2.27",
            "9.2=2.3",
            "9.22=2.33",
            "9.24=2.36",
            "9.26=2.391",
            "9.28=2.422",
            "9.3=2.456",
            "9.32=2.49",
            "9.34=2.525",
            "9.36=2.56",
            "9.38=2.595",
            "9.4=2.63",
            "9.42=2.664",
            "9.44=2.698",
            "9.46=2.734",
            "9.48=2.77",
            "9.5=2.81",
            "9.52=2.85",
            "9.54=2.89",
            "9.56=2.93",
            "9.58=2.966",
            "9.6=3.002",
            "9.62=3.041",
            "9.64=3.08",
            "9.66=3.12",
            "9.68=3.16",
            "9.7=3.22",
            "9.72=3.24",
            "9.74=3.28",
            "9.76=3.32",
            "9.78=3.363",
            "9.8=3.406",
            "9.82=3.448",
            "9.84=3.49",
            "9.86=3.53",
            "9.88=3.57",
            "9.9=3.613",
            "9.92=3.656",
            "9.94=3.698",
            "9.96=3.74",
            "9.98=3.78",
            "10=3.82",
            "10.02=3.864",
            "10.04=3.908",
            "4.01=1.35375",
            "4.03=1.35125",
            "4.05=1.34875",
            "4.07=1.34625",
            "4.09=1.3435",
            "4.11=1.3405",
            "4.13=1.338",
            "4.15=1.336",
            "4.17=1.33375",
            "4.19=1.33125",
            "4.21=1.32875",
            "4.23=1.32625",
            "4.25=1.32375",
            "4.27=1.32125",
            "4.29=1.319",
            "4.31=1.317",
            "4.33=1.315",
            "4.35=1.313",
            "4.37=1.311",
            "4.39=1.309",
            "4.41=1.3065",
            "4.43=1.3035",
            "4.45=1.3005",
            "4.47=1.2975",
            "4.49=1.295",
            "4.51=1.293",
            "4.53=1.291",
            "4.55=1.289",
            "4.57=1.2865",
            "4.59=1.2835",
            "4.61=1.281",
            "4.63=1.279",
            "4.65=1.2765",
            "4.67=1.2735",
            "4.69=1.271",
            "4.71=1.269",
            "4.73=1.2665",
            "4.75=1.2635",
            "4.77=1.261",
            "4.79=1.259",
            "4.81=1.2565",
            "4.83=1.2535",
            "4.85=1.251",
            "4.87=1.249",
            "4.89=1.24675",
            "4.91=1.24425",
            "4.93=1.242",
            "4.95=1.24",
            "4.97=1.23825",
            "4.99=1.23625",
            "5.01=1.23375",
            "5.03=1.23125",
            "5.05=1.22875",
            "5.07=1.22625",
            "5.09=1.22375",
            "5.11=1.22125",
            "5.13=1.21875",
            "5.15=1.21625",
            "5.17=1.21375",
            "5.19=1.21125",
            "5.21=1.20625",
            "5.23=1.20375",
            "5.25=1.204",
            "5.27=1.202",
            "5.29=1.20025",
            "5.31=1.19875",
            "5.33=1.197",
            "5.35=1.195",
            "5.37=1.192",
            "5.39=1.189",
            "5.41=1.1865",
            "5.43=1.1835",
            "5.45=1.181",
            "5.47=1.179",
            "5.49=1.177",
            "5.51=1.175",
            "5.53=1.172",
            "5.55=1.169",
            "5.57=1.1665",
            "5.59=1.1635",
            "5.61=1.161",
            "5.63=1.159",
            "5.65=1.157",
            "5.67=1.155",
            "5.69=1.153",
            "5.71=1.151",
            "5.73=1.1485",
            "5.75=1.1455",
            "5.77=1.143",
            "5.79=1.141",
            "5.81=1.139",
            "5.83=1.137",
            "5.85=1.135",
            "5.87=1.132",
            "5.89=1.1285",
            "5.91=1.1255",
            "5.93=1.123",
            "9.95=1.121",
            "5.97=1.122",
            "5.99=1.125",
            "6.01=1.12",
            "6.03=1.113",
            "6.05=1.111",
            "6.07=1.109",
            "6.09=1.1065",
            "6.11=1.1035",
            "6.13=1.101",
            "6.15=1.099",
            "6.17=1.097",
            "6.19=1.095",
            "6.21=1.0925",
            "6.23=1.0895",
            "6.25=1.087",
            "6.27=1.085",
            "6.29=1.0825",
            "6.31=1.0795",
            "6.33=1.077",
            "6.35=1.075",
            "6.37=1.0725",
            "6.39=1.0695",
            "6.41=1.0665",
            "6.43=1.0635",
            "6.45=1.061",
            "6.47=1.059",
            "6.49=1.057",
            "6.51=1.055",
            "6.53=1.053",
            "6.55=1.051",
            "6.57=1.0485",
            "6.59=1.0455",
            "6.61=1.043",
            "6.63=1.041",
            "6.65=1.039",
            "6.67=1.037",
            "6.69=1.035",
            "6.71=1.033",
            "6.73=1.031",
            "6.75=1.029",
            "6.77=1.0265",
            "6.79=1.0235",
            "6.81=1.021",
            "6.83=1.019",
            "6.85=1.017",
            "6.87=1.015",
            "6.89=1.0125",
            "6.91=1.0095",
            "6.93=1.007",
            "6.95=1.005",
            "6.97=1.003",
            "6.99=1.001",
            "7.77=1.0045",
            "7.79=1.0135",
            "7.81=1.023",
            "7.83=1.033",
            "7.85=1.043",
            "7.87=1.053",
            "7.89=1.063",
            "7.91=1.073",
            "7.93=1.086",
            "7.95=1.0965",
            "7.97=1.1045",
            "7.99=1.115",
            "8.01=1.126",
            "8.03=1.138",
            "8.05=1.149",
            "8.07=1.159",
            "8.09=1.171",
            "8.11=1.185",
            "8.13=1.198",
            "8.15=1.21",
            "8.17=1.222",
            "8.19=1.234",
            "8.21=1.2465",
            "8.23=1.2595",
            "8.25=1.2735",
            "8.27=1.2885",
            "8.29=1.303",
            "8.31=1.317",
            "8.33=1.3325",
            "8.35=1.3495",
            "8.37=1.366",
            "8.39=1.382",
            "8.41=1.3975",
            "8.43=1.4125",
            "8.45=1.429",
            "8.47=1.447",
            "8.49=1.462",
            "8.51=1.474",
            "8.53=1.4915",
            "8.55=1.5145",
            "8.57=1.535",
            "8.59=1.553",
            "8.61=1.5715",
            "8.63=1.5905",
            "8.65=1.61",
            "8.67=1.63",
            "8.69=1.6505",
            "8.71=1.6715",
            "8.73=1.693",
            "8.75=1.715",
            "8.77=1.7365",
            "8.79=1.7575",
            "8.81=1.7795",
            "8.83=1.8025",
            "8.85=1.826",
            "8.87=1.85",
            "8.89=1.874",
            "8.91=1.898",
            "8.93=1.9235",
            "8.95=1.9505",
            "8.97=1.977",
            "8.99=2.003",
            "9.01=2.022",
            "9.03=11.549",
            "9.05=11.583",
            "9.07=2.109",
            "9.09=2.1365",
            "9.11=2.1655",
            "9.13=2.195",
            "9.15=2.225",
            "9.17=2.255",
            "9.19=2.285",
            "9.21=2.315",
            "9.23=2.345",
            "9.25=2.3755",
            "9.27=2.4065",
            "9.29=2.439",
            "9.31=2.473",
            "9.33=2.5075",
            "9.35=2.5425",
            "9.37=2.5775",
            "9.39=2.6125",
            "9.41=2.647",
            "9.43=2.681",
            "9.45=2.716",
            "9.47=2.752",
            "9.49=2.79",
            "9.51=2.83",
            "9.53=2.87",
            "9.55=2.91",
            "9.57=2.948",
            "9.59=2.984",
            "9.61=3.0215",
            "9.63=3.0605",
            "9.65=3.1",
            "9.67=3.14",
            "9.69=3.19",
            "9.71=3.23",
            "9.73=3.26",
            "9.75=3.3",
            "9.77=3.3415",
            "9.79=3.3845",
            "9.81=3.427",
            "9.83=3.469",
            "9.85=3.51",
            "9.87=3.55",
            "9.89=3.5915",
            "9.91=3.6345",
            "9.93=3.677",
            "9.95=3.719",
            "9.97=3.76",
            "9.99=3.8",
            "10.01=3.842",
            "10.03=3.886"
    };


    private static final String[] KSP_SIO2_TEMP = new String[]{
            "0=74.6",
            "0.1=74.8",
            "0.2=75",
            "0.3=75.25",
            "0.4=75.5",
            "0.5=75.75",
            "0.6=76",
            "0.7=76.2",
            "0.8=76.4",
            "0.9=76.6",
            "1=76.8",
            "1.1=77",
            "1.2=77.2",
            "1.3=77.4",
            "1.4=77.6",
            "1.5=77.8",
            "1.6=78",
            "1.7=78.2",
            "1.8=78.4",
            "1.9=78.65",
            "2=78.9",
            "2.1=79.1",
            "2.2=79.3",
            "2.3=79.55",
            "2.4=79.8",
            "2.5=80",
            "2.6=80.2",
            "2.7=80.4",
            "2.8=80.6",
            "2.9=80.8",
            "3=81",
            "3.1=81.25",
            "3.2=81.5",
            "3.3=81.7",
            "3.4=81.9",
            "3.5=82.05",
            "3.6=82.2",
            "3.7=82.45",
            "3.8=82.7",
            "3.9=82.9",
            "4=83.1",
            "4.1=83.3",
            "4.2=83.5",
            "4.3=83.7",
            "4.4=83.9",
            "4.5=84.1",
            "4.6=84.3",
            "4.7=84.55",
            "4.8=84.8",
            "4.9=85",
            "5=85.2",
            "5.1=85.4",
            "5.2=85.6",
            "5.3=85.8",
            "5.4=86",
            "5.5=86.25",
            "5.7=86.75",
            "5.8=87",
            "5.9=87.15",
            "6=87.3",
            "6.1=87.5",
            "6.2=87.7",
            "6.3=87.95",
            "6.4=88.2",
            "6.5=88.4",
            "6.6=88.6",
            "6.7=88.8",
            "6.8=89",
            "6.9=89.25",
            "7=89.5",
            "7.1=89.7",
            "7.2=89.9",
            "7.3=90.1",
            "7.4=90.3",
            "7.5=90.5",
            "7.6=90.7",
            "7.7=90.9",
            "7.8=91.1",
            "7.9=91.3",
            "8=91.5",
            "8.1=91.7",
            "8.2=91.9",
            "8.3=92.1",
            "8.4=92.3",
            "8.5=92.55",
            "8.6=92.8",
            "8.7=93",
            "8.8=93.2",
            "8.9=93.45",
            "9=93.7",
            "9.1=93.95",
            "9.2=94.2",
            "9.3=94.4",
            "9.4=94.6",
            "9.5=94.75",
            "9.6=94.9",
            "9.7=95.15",
            "9.8=95.4",
            "9.9=95.6",
            "10=95.8",
            "10.1=96",
            "10.2=96.2",
            "10.3=96.4",
            "10.4=96.6",
            "10.5=96.8",
            "10.6=97",
            "10.7=97.25",
            "10.8=97.5",
            "10.9=97.7",
            "11=97.9",
            "11.1=98.4",
            "11.2=98.4",
            "11.3=98.6",
            "11.4=98.8",
            "11.5=99.02",
            "11.6=99.2",
            "11.7=99.4",
            "11.8=99.6",
            "11.9=99.8",
            "12=100",
            "12.1=100.2",
            "12.2=100.4",
            "12.3=100.6",
            "12.4=100.8",
            "12.5=101.05",
            "12.6=101.3",
            "12.7=101.5",
            "12.8=101.7",
            "12.9=101.9",
            "13=102.1",
            "13.1=102.35",
            "13.2=102.6",
            "13.3=102.8",
            "13.4=103",
            "13.5=103.2",
            "13.6=103.4",
            "13.7=103.6",
            "13.8=103.8",
            "13.9=104",
            "14=104.2",
            "14.1=104.4",
            "14.2=104.6",
            "14.3=104.8",
            "14.4=150",
            "14.5=105.25",
            "14.6=105.5",
            "14.7=105.7",
            "14.8=105.9",
            "14.9=106.15",
            "15=106.4",
            "15.1=106.6",
            "15.2=106.8",
            "15.3=107",
            "15.4=107.2",
            "15.5=107.4",
            "15.6=107.6",
            "15.7=107.8",
            "15.8=108",
            "15.9=108.2",
            "16=108.4",
            "16.1=108.65",
            "16.2=108.9",
            "16.3=109.1",
            "16.4=109.3",
            "16.5=109.55",
            "16.6=109.8",
            "16.7=110",
            "16.8=110.2",
            "16.9=110.4",
            "17=110.6",
            "17.1=110.8",
            "17.2=111",
            "17.3=111.2",
            "17.4=111.4",
            "17.5=111.6",
            "17.6=111.8",
            "17.7=112",
            "17.8=112.2",
            "17.9=112.45",
            "18=112.7",
            "18.1=112.9",
            "18.2=113.1",
            "18.3=113.3",
            "18.4=113.5",
            "18.5=113.75",
            "18.6=114",
            "18.7=114.2",
            "18.8=114.4",
            "18.9=114.6",
            "19=114.8",
            "19.1=115",
            "19.2=115.2",
            "19.3=115.45",
            "19.4=115.7",
            "19.5=115.85",
            "19.6=116",
            "19.7=116.25",
            "19.8=116.5",
            "19.9=116.75",
            "20=117",
            "20.1=117.2",
            "20.2=117.4",
            "20.3=117.6",
            "20.4=117.8",
            "20.5=118",
            "20.6=118.2",
            "20.7=118.4",
            "20.8=118.6",
            "20.9=118.8",
            "21=119",
            "21.1=119.2",
            "21.2=119.4",
            "21.3=119.65",
            "21.4=119.9",
            "21.5=120.1",
            "21.6=120.3",
            "21.7=120.5",
            "21.8=120.7",
            "21.9=120.95",
            "22=121.2",
            "22.1=121.4",
            "22.2=121.6",
            "22.3=121.8",
            "22.4=122",
            "22.5=122.2",
            "22.6=122.4",
            "22.7=122.6",
            "22.8=122.8",
            "22.9=123",
            "23=123.2",
            "23.1=123.4",
            "23.2=123.6",
            "23.3=123.85",
            "23.4=124.1",
            "23.5=124.35",
            "23.6=124.6",
            "23.7=124.8",
            "23.8=125",
            "23.9=125.2",
            "24=125.4",
            "24.1=125.6",
            "24.2=125.8",
            "24.3=126",
            "24.5=126.2",
            "24.6=126.6",
            "24.7=126.8",
            "24.8=127",
            "24.9=127.25",
            "25=127.5",
            "25.1=127.7",
            "25.2=127.9",
            "25.3=128.15",
            "25.4=128.4",
            "25.5=128.6",
            "25.6=128.8",
            "25.7=129",
            "25.8=129.2",
            "25.9=129.4",
            "26=129.6",
            "26.1=129.8",
            "26.2=130",
            "26.3=130.2",
            "26.4=130.4",
            "26.5=130.6",
            "26.6=130.8",
            "26.7=131",
            "26.8=131.2",
            "26.9=131.45",
            "27=131.7",
            "27.1=131.9",
            "27.2=132.1",
            "27.3=132.35",
            "27.4=132.6",
            "27.5=132.8",
            "27.6=133",
            "27.7=133.2",
            "27.8=133.4",
            "27.9=133.6",
            "28=133.8",
            "28.1=134.05",
            "28.2=134.3",
            "28.3=134.5",
            "28.4=134.7",
            "28.5=134.9",
            "28.6=135.1",
            "28.7=135.3",
            "28.8=135.5",
            "28.9=135.7",
            "29=135.9",
            "29.1=136.1",
            "29.2=136.3",
            "29.3=136.55",
            "29.4=136.8",
            "29.5=137",
            "29.6=137.2",
            "29.7=137.45",
            "29.8=137.7",
            "29.9=137.9",
            "30=138.1",
            "30.1=138.3",
            "30.2=138.5",
            "30.3=138.7",
            "30.4=138.9",
            "30.5=139.1",
            "30.6=139.3",
            "30.7=139.55",
            "30.8=139.8",
            "30.9=140",
            "31=140.2",
            "31.1=140.4",
            "31.2=140.6",
            "31.3=140.8",
            "31.4=141",
            "31.5=141.25",
            "31.6=141.5",
            "31.7=141.7",
            "31.8=141.9",
            "31.9=142.1",
            "32=142.3",
            "32.1=142.55",
            "32.2=142.8",
            "32.3=143",
            "32.4=143.2",
            "32.5=143.4",
            "32.6=143.6",
            "32.7=143.8",
            "32.8=144",
            "32.9=144.2",
            "33=144.4",
            "33.1=144.65",
            "33.2=144.9",
            "33.3=145.1",
            "33.4=145.3",
            "33.5=145.5",
            "33.6=145.7",
            "33.7=145.9",
            "33.8=146.1",
            "33.9=146.35",
            "34=146.6",
            "34.1=146.8",
            "34.2=147",
            "34.3=147.2",
            "34.4=147.4",
            "34.5=147.6",
            "34.6=147.8",
            "34.7=148",
            "34.8=148.2",
            "34.9=148.45",
            "35=148.7",
            "35.1=148.9",
            "35.2=149.1",
            "35.3=149.35",
            "35.4=149.6",
            "35.5=149.8",
            "35.6=150",
            "35.7=150.2",
            "35.8=150.4",
            "35.9=150.6",
            "36=150.8",
            "36.1=151",
            "36.2=151.2",
            "36.3=151.4",
            "36.4=151.6",
            "36.5=151.8",
            "36.6=152",
            "36.7=152.25",
            "36.8=152.5",
            "36.9=152.7",
            "37=152.9",
            "37.1=153.1",
            "37.2=153.3",
            "37.3=153.55",
            "37.4=153.8",
            "37.5=154",
            "37.6=154.2",
            "37.7=154.45",
            "37.8=154.7",
            "37.9=154.9",
            "38=155.1"
    };

    /**
     * 获取KSP值
     *
     * @param kspType 1: caso4 2:baso4 3:srso4 4:sio2_ph 5:sio2_temp
     * @param key
     * @return
     */
    public static String getValueByKspType(int kspType, double key) {
        String ksp = "1";
        String[] dataArr = new String[]{};
        String keyString = "";

        switch (kspType) {
            case 1:
                if (key >= 0.1) {
                    key = new BigDecimal(key).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.2f", key);
                } else {
                    key = new BigDecimal(key).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.3f", key);
                }
                dataArr = KSP_CASO4;
                break;
            case 2:
                if (key >= 0.11) {
                    key = new BigDecimal(key).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.2f", key);
                } else {
                    key = new BigDecimal(key).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.3f", key);
                }
                dataArr = KSP_BASO4;
                break;
            case 3:
                if (key >= 0.2) {
                    key = new BigDecimal(key).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.2f", key);
                } else {
                    key = new BigDecimal(key).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
                    keyString = String.format("%.3f", key);
                }
                dataArr = KSP_SRSO4;
                break;
            case 4:
                key = new BigDecimal(key).setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
                if (key > 7 && key < 7.76) key = 7;
                keyString = String.format("%.2f", key);
                dataArr = KSP_SIO2_PH;
                break;
            case 5:
//                if (key < 10) {
//                    key = new BigDecimal(key).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
//                    keyString = String.format("%.2f", key);
//                } else if (key <= 37.009 || key == 38F) {
//                    key = new BigDecimal(key).setScale(3, BigDecimal.ROUND_HALF_UP).doubleValue();
//                    keyString = String.format("%.3f", key);
//                } else {
//                    key = 37.009F;
//                    keyString = String.format("%.3f", key);
//                }
                key = new BigDecimal(key).setScale(1, BigDecimal.ROUND_HALF_UP).doubleValue();
                keyString = String.format("%.2f", key);
                dataArr = KSP_SIO2_TEMP;
                break;
            default:
                break;
        }


        for (String data : dataArr) {
            String[] keyVal = data.split("=");
            if (key == Double.parseDouble(keyVal[0])) {
                ksp = keyVal[1];
                break;
            }
        }

        return ksp;
    }
}
